<%-- 
    Document   : displayTime
    Created on : Oct 17, 2009, 12:11:24 PM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%

            int Second = 60;
            int Minute = 0;
            int Hour = 0;
            int timeMinute = 2;
            while (true) {
                out.println(Minute +":"+ Second);
                if (Second < 60) {
                    Second++;
                } else {
                    Second = 0;
                    if (Minute < timeMinute) {
                        Minute++;
                    } else {
                        Minute = 0;
                        if (Hour < 12) {
                            Hour++;
                        } else {
                            Hour = 0;
                        }
                    }
                }
                if (Minute == timeMinute) {
                    break;
                }
                try {
                    Thread.sleep(1000);

                } catch (Exception ex) {
                }
            }

        %>
    </body>
</html>
